Component({
    properties: {
        border: {
            type: Boolean,
            value: !0
        }
    },
    relations: {
        "../cell-swipe/cell-swipe": {
            type: "child",
            linked: function() {
                this._updateIsLastCell();
            },
            linkChanged: function() {
                this._updateIsLastCell();
            },
            unlinked: function() {
                this._updateIsLastCell();
            }
        }
    },
    externalClasses: [ "cells" ],
    ready: function() {
        this.index = -1;
    },
    methods: {
        _updateIsLastCell: function() {
            var e = this.getRelationNodes("../cell-swipe/cell-swipe"), t = e.length;
            if (0 < t) {
                var i = t - 1;
                e.forEach(function(e, t) {
                    return e.updateIsLastCell(t === i);
                });
            }
        },
        resetPosition: function(e, t) {
            var s = this, i = this.getRelationNodes("../cell-swipe/cell-swipe");
            ~this.index && (-1 < this.index && !this.key ? i[this.index] && i[this.index].moveAnimation(0) : this.key && i.forEach(function(e) {
                var t = e.data, i = t.key, n = t.index;
                i === s.key && n === s.index && e.moveAnimation(0);
            })), this.index = e, this.key = t;
        },
        emitEvent: function(e, t, i) {
            this.triggerEvent("righttap", {
                method: e,
                index: t,
                key: i
            }, {}), this.resetPosition(-1);
        }
    }
});